﻿Public Class Obra
    Dim db As DataClasses1DataContext


    Public ReadOnly Property nombre() As String
        Get
            db = New DataClasses1DataContext(sqlConfiguracon.GetConnectionString)
            Dim query = (From o As Obra In db.Obra Where
                         o.Obra = Me.Obra Select o).FirstOrDefault
            Return query.nombre
        End Get
    End Property

    ReadOnly Property lista As List(Of Obra)
        Get
            db = New DataClasses1DataContext(sqlConfiguracon.GetConnectionString())

            Dim query = (From o In db.Obra _
                       Select o).ToList()
            Return query
        End Get
    End Property

End Class
